<?php
/*
Copyright 2008, Nathalia


Author:
Nathalia Sautchuk Patrício          (nathalia.sautchuk@gmail.com)

*/
class ArtigoRecord extends TActiveRecord
{
    const TABLE='Artigo';
    public $ArtigoID;
	public $Titulo;
	public $Resumo;
	public $Abstract;
	public $PalavraChave1;
	public $PalavraChave2;
	public $PalavraChave3;
	public $Status;
	public $DataEnvio;
    public $CongressoID;

    public static $RELATIONS=array
    (
        'congresso'          => array(self::BELONGS_TO, 'CongressoRecord', 'CongressoID'),
        'avaliacao'          => array(self::HAS_MANY, 'AvaliacaoRecord', 'ArtigoID'),
        'autores'            => array(self::MANY_TO_MANY, 'UserRecord', 'ArtigoAutor'),
    );

    public static function finder($className=__CLASS__)
    {
        return parent::finder($className);
    }

    public static function printStatus($status)
    {
        switch($status)
        {
            case 0: return 'Em Avalia&ccedil;&atilde;o';
            case 1: return 'Aprovado';
            case 2: return 'Reprovado';
        }
    }
}
?>
